import  Mock  from "mockjs";


import user from "./mockData/user.js";

// 拦截
Mock.mock('/api/home/getData',
// 打印拦截
function (){
    console.log('拦截');
    return [
        {
            path: "/",
            name: "home",
            label: "首页",
            icon: "s-home",
            url: "Home/Home",
        },
    ]
}
)

// 用户数据
Mock.mock('/api/user/add','post',user.createUser)//创建用户
// 更新用户
Mock.mock('/api/user/edit','post',user.updateUser)
// 删除
Mock.mock('/api/user/del','post',user.deleteUser)
// 获取用户数据
Mock.mock('/api/user/getuser',user.getUserList)
